#ifndef TRACKINGOBJECT_H
#define TRACKINGOBJECT_H

#include <QList>
#include <cv.h>

class TrackingObject
{
public:
    TrackingObject();
    TrackingObject(const TrackingObject& _obj);
    TrackingObject(
            int _id,
            CvScalar _color,
            CvRect _rect
            );

    int ID();
    int ID(int _id);

    CvRect Rect();
    void Rect(CvRect _rect);

    CvScalar Color();
    void Color(int val0, int val1, int val2);
    void Color(CvScalar _color);

    QList<CvPoint> Trace();
    void Trace(QList<CvPoint> _trace);
    void appendTrace(CvPoint);

    CvPoint center();
    static CvPoint center(CvRect re);
    CvPoint predictedCenter();
    TrackingObject predictedObject();

    void update(CvRect _rect);

    TrackingObject operator=(TrackingObject obj);

protected:
    int id;
    CvRect rect;
    CvScalar color;
    QList<CvPoint> trace;

private:

};

#endif // TRACKINGOBJECT_H
